import {mapMutations, mapGetters} from 'vuex'

export default {
  install(Vue) {
    Vue.mixin({
      onShow() {
        let theme = uni.getStorageSync('theme')? uni.getStorageSync('theme') : 'day-theme'
        this.vGetTheme(theme)
      },
      computed: {
        ...mapGetters({
          vtheme: 'theme/theme',
        })
      },
      methods: {
        ...mapMutations({
          vGetTheme: 'theme/GET_THEME',
        }),

      }
    })
  }
}
